
*************************************************
*
* WELFARE MASTER FILE
*
*************************************************

clear all
set more off
set trace off


*Define Program for 3y elastic welfare maximization and execute the 4 separate loops simultaneously:

parallel setclusters 7, f


cap program drop myprogram
program def myprogram
  if ($pll_instance == 1) do  "$root/Code/Estimation/Welfare_max/welfare_max08_3y_elast_1.do"
  else if ($pll_instance == 2) do "$root/Code/Estimation/Welfare_max/welfare_max08_3y_elast_2.do"
  else if ($pll_instance == 3) do "$root/Code/Estimation/Welfare_max/welfare_max08_3y_elast_3.do"
    else if ($pll_instance == 4) do "$root/Code/Estimation/Welfare_max/welfare_max08_3y_elast_4.do"
 else if ($pll_instance == 5) do "$root/Code/Estimation/Welfare_max/welfare_max08_3y_elast_5.do"
    else if ($pll_instance == 6) do "$root/Code/Estimation/Welfare_max/welfare_max08_3y_elast_6.do"
	    else if ($pll_instance == 7) do "$root/Code/Estimation/Welfare_max/welfare_max08_3y_elast_7.do"

end
parallel, nodata prog(myprogram): myprogram
